package org.whale.springcloud.eureka.user.feign.application;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.netflix.feign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;

@SpringBootApplication
@EnableEurekaClient
@EnableFeignClients(basePackages = "org.whale.springcloud.eureka.user.feign.service")
@EnableDiscoveryClient
@ComponentScan(basePackages = "org.whale.springcloud.eureka.user.feign")
// EnableFeignClients 需要指定包路径，service接口，否则注入报错，默认当前包路径及子路径
public class EurekaUserFeignApplication {

  private static final Logger logger = LoggerFactory.getLogger(EurekaUserFeignApplication.class);

  public static void main(String[] args) {

    SpringApplication.run(EurekaUserFeignApplication.class, args);

    logger.info("************ user feign app start ************");
  }
}
